<?php
/**
 * Notes:
 * User: wudg <544038230@qq.com>
 * Date: 2025/9/9 16:23
 */

namespace App\Dao\Users;


use App\Constants\System\SysStatusConst;
use App\Dao\BaseDao;
use App\Model\Users\UsersCard;

class UsersCardDao extends BaseDao
{


    public function getCardsByIds(array $ids,array $fields = [])
    {

        $model = UsersCard::query();

        if(!empty($fields)) $model->select($fields);
        return $model->whereIn('id',$ids)->where('is_del','=',SysStatusConst::NORMAL->value)->get()->toArray();
    }


    public function getCardById(int $id)
    {
       return  UsersCard::query()->where('id','=',$id)->first();
    }
}